package com.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class UserController {


    //请求路径
    @RequestMapping("/login")
    public String toLoginPage(){
        System.out.println("进入登录请求==========");
        return "login";
    }

    @GetMapping("/reg/{uname}/{pass}")
    public String register(@PathVariable("uname") String uname , @PathVariable("pass") String pass){
        System.out.println(uname);
        System.out.println(pass);
        System.out.println("进入注册页面===");

        return "register";
    }
}
